import Vue from 'vue';
import Router from 'vue-router';
import Layout from '@/layout/PageLayout.vue';

Vue.use(Router);

export const routes = [
  {
    path: '/',
    component: Layout,
    meta: {
      title: '首页',
    },
    children: [
      {
        meta: {
          title: '新增二级商协议',
        },
        path: 'secondarySupplierAgreement/create',
        component: () =>
          import(
            '@/views/annualAgreementManagement/secondarySupplierAgreement/CreateSecondarySupplierAgreement.vue'
          ).then(m => m.default),
      },
    ],
  },
  {
    path: '/masterData',
    component: Layout,
    meta: {
      title: '主数据',
    },
  },
  {
    path: '/jurisdictionManagement',
    component: Layout,
    meta: {
      title: '辖区管理',
    },
  },
];

const createRouter = () =>
  new Router({
    routes,
  });

const router = createRouter();

export default router;
